import random 
f = int(input("Сколько выстрелов вы хотите сделать? ")) 
g = 0 
cafar = 0 
while g < f: 
    g = g + 1 
    e = random.randint(-100, 100) 
    l = random.randint(-100, 100) 
    if e > 0 and e < 6 and l > 0 and l < 6: 
        cafar = cafar + 1 
    elif e > 0 and e < 6 and l < 0 and l > (-9): 
        cafar = cafar + 1 
    elif e < 0 and e > (-8) and l > 0 and l < 6: 
        cafar = cafar + 1 
    elif e < 0 and e > (-8) and l < 0 and l > (-9): 
        cafar = cafar + 1 
print("Вы попали ", cafar, " раз")
